﻿@*
    用户信息
*@
@model ChangePasswordModel
@using NewLife.Cube.Areas.Admin.Models;
@using System.Linq;
@using System.Reflection;
@using XCode;
@using XCode.Configuration
@using NewLife.Cube.Entity;
@using XCode.Membership;
@using NewLife;

@{
    var requireOldPass = Model.SsoName.IsNullOrEmpty();
}

<div class="row m-0">
    <div class=" col-xl-3 col-lg-4">
        <div class="card  pb-lg-20">
            <div class="card-header">
                <h4 class="card-title text-muted">信息选项</h4>
            </div>

            <div class="text-center col-md-12 cube-flex-con cube-flex-items">
                <ul class="nav nav-tabs nav-pills flex-row border-0 flex-md-column mt-2 mb-3 mb-md-0 fs-6">
                    <li class="nav-item me-0 pt-2 pm-3 text-start">
                        <a class="nav-link text-gray-700" href="@Url.Action("info")"><span class="fas fa-user text-gray-700 pe-5"></span>基本信息</a>
                    </li>
                    <li class="nav-item me-0 pt-2 pm-3 text-start">
                        <a class="nav-link active bg-light-info text-info" href="@Url.Action("ChangePassword")"><span class="fas fa-unlock text-info pe-5"></span>修改密码</a>
                    </li>
                    <li class="nav-item me-0 pt-2 pm-3 text-start">
                        <a class="nav-link text-gray-700" href="@Url.Action("Binds")"><span class="fas fa-user-lock text-gray-700 pe-5"></span>第三方授权</a>
                    </li>

                </ul>
            </div>

        </div>



    </div>

    <div class="col-xl-9 col-lg-8">
        <div class="card mb-5 mb-xl-10">
            <div class="card-header cursor-pointer">
                <div class="card-title m-0">
                    <h3 class="card-title text-muted">修改密码</h3>
                </div>
            </div>

            <div class="card-body p-9">
                @using (Html.BeginForm("ChangePassword", "User"))
                {
                    <div class="row mb-5">
                        <label class="col-3 col-form-label d-flex justify-content-end text-muted">账号</label>
                        <div class="col-lg-4">
                            <input value="@Model.Name" type="text" class="form-control form-control-sm" disabled="disabled" />
                        </div>
                        <label class="col-lg-5 text-muted">
                            @if (!Model.SsoName.IsNullOrEmpty())
                            {
                                <label>登录自 @Model.SsoName</label>
                            }
                        </label>
                    </div>
                    @if (requireOldPass)
                    {
                        <div class="row mb-5">
                            <label class="col-3 col-form-label d-flex justify-content-end text-muted">原密码</label>
                            <div class="col-lg-4">
                                <input id="OldPassword" name="OldPassword" type="text" class="form-control form-control-sm" />
                            </div>
                            <label class="col-lg-5 text-muted"></label>
                        </div>
                    }
                    <div class="row mb-5">
                        <label class="col-3 col-form-label d-flex justify-content-end text-muted">新密码</label>
                        <div class="col-lg-4">
                            <input id="NewPassword" name="NewPassword" type="text" class="form-control form-control-sm" />
                        </div>
                        <label class="col-lg-5 text-muted"></label>
                    </div>
                    <div class="row mb-10">
                        <label class="col-3 col-form-label d-flex justify-content-end text-muted">新密码</label>
                        <div class="col-lg-4">
                            <input id="NewPassword2" name="NewPassword2" type="text" class="form-control form-control-sm" />
                        </div>
                        <label class="col-lg-5 text-muted"></label>
                    </div>

                    <div class="clearfix form-actions col-sm-12 col-md-12 mt-10">
                        <label class="control-label col-3"></label>
                        <button type="submit" class="btn btn-sm btn-outline btn-outline-dashed btn-outline-info btn-active-light-info align-self-center me-2"><i class="fas fa-save text-info"></i><strong>保存</strong></button>
                        <button type="button" class="btn btn-sm btn-outline btn-outline-dashed btn-outline-default btn-active-light align-self-center" onclick="history.go(-1);"><i class="fas fa-reply"></i><strong>取消</strong></button>
                    </div>

                }


            </div>
        </div>

    </div>
</div>

